package com.bwie.user.controller;

import com.bwie.common.domain.User;
import com.bwie.common.result.Result;
import com.bwie.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * @Author：杨鹏
 * @Package：com.bwie.user.controller
 * @Project：yp_zhoukao723
 * @name：UserController
 * @Date：2024/7/23 9:17
 */

@RestController
@RequestMapping("user")
public class UserController {

    @Autowired
    private UserService userService;

    @PostMapping("login")
    public Result<User> login(@RequestBody User user){
        return userService.login(user);
    }

    @GetMapping("listUserId")
    public Result listUserId(){
        return userService.listUserId();
    }

    @PostMapping("updUser")
    public Result<User> updUser(@RequestBody User user){
        return userService.updUser(user);
    }

}
